using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._FileGeodatabase
{
    /// <summary>
    /// <para>Generate File Geodatabase License</para>
    /// <para>Generates a license file (.sdlic) for displaying the contents in a licensed file geodatabase created by the Generate Licensed File Geodatabase tool.</para>
    /// <para>生成许可文件 （.sdlic），用于显示由生成许可文件地理数据库工具创建的许可文件地理数据库中的内容。</para>
    /// </summary>    
    [DisplayName("Generate File Geodatabase License")]
    public class GenerateFgdbLicense : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateFgdbLicense()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_lic_def_file">
        /// <para>Input License Definition File</para>
        /// <para>The license definition file (.licdef) created by the Generate Licensed File Geodatabase tool.</para>
        /// <para>由生成许可文件地理数据库工具创建的许可定义文件 （.licdef）。</para>
        /// </param>
        /// <param name="_out_lic_file">
        /// <para>Output Data License File</para>
        /// <para>The license file (.sdlic) for distribution.</para>
        /// <para>用于分发的许可证文件 （.sdlic）。</para>
        /// </param>
        public GenerateFgdbLicense(object _in_lic_def_file, object _out_lic_file)
        {
            this._in_lic_def_file = _in_lic_def_file;
            this._out_lic_file = _out_lic_file;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Generate File Geodatabase License";

        public override string CallName => "management.GenerateFgdbLicense";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_lic_def_file, _out_lic_file, _allow_export.GetGPValue(), _exp_date];

        /// <summary>
        /// <para>Input License Definition File</para>
        /// <para>The license definition file (.licdef) created by the Generate Licensed File Geodatabase tool.</para>
        /// <para>由生成许可文件地理数据库工具创建的许可定义文件 （.licdef）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input License Definition File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_lic_def_file { get; set; }


        /// <summary>
        /// <para>Output Data License File</para>
        /// <para>The license file (.sdlic) for distribution.</para>
        /// <para>用于分发的许可证文件 （.sdlic）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Data License File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_lic_file { get; set; }


        /// <summary>
        /// <para>Allow Export of Vector Data</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the export of vector data is allowed.</para>
        ///   <bulletList>
        ///     <bullet_item>Vector data cannot be exported—Vector data cannot be exported with the data license file (.sdlic) installed. This is the default.</bullet_item><para/>
        ///     <bullet_item>Allow export of vector data— Vector data can be exported with the data license file (.sdlic) installed.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否允许导出矢量数据。</para>
        ///   <bulletList>
        ///     <bullet_item>无法导出矢量数据 - 安装数据许可文件 （.sdlic） 后无法导出矢量数据。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>允许导出矢量数据 — 矢量数据可以在安装数据许可文件 （.sdlic） 的情况下导出。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Allow Export of Vector Data")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _allow_export_value _allow_export { get; set; } = _allow_export_value._DENY_EXPORT;

        public enum _allow_export_value
        {
            /// <summary>
            /// <para>Vector data cannot be exported</para>
            /// <para>Vector data cannot be exported—Vector data cannot be exported with the data license file (.sdlic) installed. This is the default.</para>
            /// <para>无法导出矢量数据 - 安装数据许可文件 （.sdlic） 后无法导出矢量数据。这是默认设置。</para>
            /// </summary>
            [Description("Vector data cannot be exported")]
            [GPEnumValue("DENY_EXPORT")]
            _DENY_EXPORT,

            /// <summary>
            /// <para>Allow export of vector data</para>
            /// <para>Allow export of vector data— Vector data can be exported with the data license file (.sdlic) installed.</para>
            /// <para>允许导出矢量数据 — 矢量数据可以在安装数据许可文件 （.sdlic） 的情况下导出。</para>
            /// </summary>
            [Description("Allow export of vector data")]
            [GPEnumValue("ALLOW_EXPORT")]
            _ALLOW_EXPORT,

        }

        /// <summary>
        /// <para>Expiration Date</para>
        /// <para>The expiration date of the data license file, after which the file geodatabase’s contents can no longer be displayed. The default value is empty (blank), which means the data license file will never expire.</para>
        /// <para>数据许可文件的到期日期，在此日期之后，文件地理数据库的内容将无法再显示。默认值为空（空白），这意味着数据许可证文件永远不会过期。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expiration Date")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _exp_date { get; set; } = null;


        public GenerateFgdbLicense SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}